/**
 * 高频事项的api js
 */
import request from "@/utils/request";
/**
 * 查询高频事项的分页数据
 * @param {*} params
 */
export function queryPages(params) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/yxpz/highFrequencyMatter/queryPages",
    method: "get",
    params: params
  });
}

/**
 * 根据hfsOids查询和当前清单中名称重复的数据
 * @param {*} hfsOids
 */
export function queryRepeatServiceName(hfsOids) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/yxpz/highFrequencyMatter/queryRepeatServiceName",
    method: "get",
    params: {
      hfsOids: hfsOids
    }
  });
}

/**
 * 导入高频事项清单
 * @param {*} hfsOids
 */
export function importHighFrequencyMatter(hfsOids) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/yxpz/highFrequencyMatter/importHighFrequencyMatter",
    method: "get",
    params: {
      hfsOids: hfsOids
    }
  });
}

/**
 * 根据id查询高频事项数据
 * @param {*} id
 */
export function getById(id) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      `/yxpz/highFrequencyMatter/getById/${id}`,
    method: "post",
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    }
  });
}
